﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SC2parser.UserControls.Admin
{
    public partial class AdressLine : UserControl
    {
        public AdressLine()
        {
            InitializeComponent();

            List<string> ListOfparsers = new List<string>();
            ListOfparsers.Add(Parsing.ParsingType.Groups.ToString());
            ListOfparsers.Add(Parsing.ParsingType.Bracket.ToString());

            listBoxParsingMethod.DataSource = ListOfparsers;

        }

        private string internetAdress;

        public string InternetAdress
        {
            get { return txtParsingAdress.Text; }
            set { internetAdress = txtParsingAdress.Text; }
        }

        private Parsing.ParsingType parserType;

        public Parsing.ParsingType ParserType
        {
            get { return parserType; }
            set { parserType = value; }
        }

        private void listBoxParsingMethod_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listBoxParsingMethod.SelectedItem.ToString() == Parsing.ParsingType.Groups.ToString())
            {
                parserType = Parsing.ParsingType.Groups;
            }
            if (listBoxParsingMethod.SelectedItem.ToString() == Parsing.ParsingType.Bracket.ToString())
            {
                parserType = Parsing.ParsingType.Bracket;
            }
        }
        
        
        
        
    }
}
